<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>订单详情 - Powered By ${systemConfig.systemName}</title>
<meta name="Author" content="webmall Team" />
<meta name="Copyright" content="webmall" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<#include "/WEB-INF/template/common/include.ftl">
<link href="${base}/template/shop/css/login.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/register.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/member_center.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/order.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/template/shop/js/login.js"></script>
<script type="text/javascript" src="${base}/template/shop/js/register.js"></script>
<script>
$(function(){ 
 	$(':radio.ratingInput').rating({callback: function(value,link){
 	$(".rank_"+this.name).val(value);
	}});
	$("#orderCommentForm").validate();
	$('#orderCommentForm .subTable').each(function(i){				
		$(this).find(".objName").each(function(j){
			var newName = $(this).attr("objName").replace("[:name]","["+(i)+"]");
			$(this).attr("name",newName);
		});
	 });
	
	
});

</script>
</head>
<body class="memberCenter">
	<#include "/WEB-INF/template/shop/header.ftl">
	<div class="body orderList">
		<div class="bodyLeft">
			<#include "/WEB-INF/template/shop/member_center_left.ftl">
		</div>
		<div class="bodyRight">
			<div class="memberCenterDetail">
				<div class="top">订单详情[${order.orderSn}]</div>
				<div class="middle">
					<div class="order_status">
						<div class="desc">
							<div <#if order.orderStatus == 'unprocessed'> class="step_checked" <#else> class="step_unchecked" </#if>>
								提交订单
							</div>
							<div <#if order.orderStatus == 'processed' && order.shippingStatus=='unshipped' && order.paymentStatus=='paid'> class="step_checked" <#else> class="step_unchecked" </#if>>
								已支付
							</div>
							<div <#if order.orderStatus == 'processed' && order.shippingStatus=='shipped'> class="step_checked" <#else> class="step_unchecked" </#if>>
								已发货
							</div>
							<div <#if order.orderStatus == 'processed' && order.shippingStatus=='confirmed'> class="step_checked" <#else> class="step_unchecked" </#if>>
								已收货
							</div>
							<div <#if order.orderStatus == 'completed'> class="step_checked" <#else> class="step_unchecked" </#if>>
								订单完成
							</div>
						</div>
						<div class="seq">
							<div <#if order.orderStatus == 'unprocessed'> class="step_checked" <#else> class="step_unchecked" </#if>>
							<label>1</label>
							</div>
							<div <#if order.orderStatus == 'processed' && order.shippingStatus=='unshipped' && order.paymentStatus=='paid'> class="step_checked" <#else> class="step_unchecked" </#if>>
							<label>2</label>
							</div>
							<div <#if order.orderStatus == 'processed' && order.shippingStatus=='shipped'> class="step_checked" <#else> class="step_unchecked" </#if>>
							<label>3</label>
							</div>
							<div <#if order.orderStatus == 'processed' && order.shippingStatus=='confirmed'> class="step_checked" <#else> class="step_unchecked" </#if>>
							<div>4</div>
							</div>
							<div <#if order.orderStatus == 'completed'> class="step_checked" <#else> class="step_unchecked" </#if>>
							<label>5</label>
							</div>
						</div>
						
					</div>
					<div class="blank"></div>
					<div class="operationInfo">
						<strong class="green">订单状态 [订单编号：${order.orderSn}]</strong>
					</div>
					<div class="blank"></div>
					<#if order.orderStatus != "completed" && order.orderStatus != "invalid">
							<#if order.paymentConfig != null>
								<form id="orderCommentForm" action="order!saveComment.action" method="post">
									<@s.token />
									<input type="hidden" name="id" value="${order.id}" />
									<input type="submit" class="formButton" value="评论" />
						<#list order.orderItemSet as list>
							<table class="listTable">
								<tr>
									<td width="200px;">
										<a href="${base}${list.productHtmlFilePath}" target="_blank">
										<#list (list.product.productImageList)! as list>
											<img width=80 height=80 src="${base}${list.thumbnailProductImagePath}" style="width:80px;height:80px;" />
											<br />
											<#if (list_index==0)>
												<#break />
											</#if>
										</#list>
										${list.productName}</a>
										
									</td>
									<td width="400px;">
									<table class="listTable subTable" width="100%">
										<tr>
											<th colspan="2">评论信息</th>
										</tr>
										<tr>
											<td class="title"  width="30%">评论等级：</td>
											<td  width="60%">
											<input class="ratingInput" type="radio" name="${list.productitem.product.id}" value="1"/>
											<input class="ratingInput" type="radio" name="${list.productitem.product.id}" value="2"/>
											<input class="ratingInput" type="radio" name="${list.productitem.product.id}" value="3"/>
											<input class="ratingInput" type="radio" name="${list.productitem.product.id}" value="4"/>
											<input class="ratingInput" type="radio" name="${list.productitem.product.id}" value="5"/>
											</td>
										</tr>
										<tr>
											<td class="title">使用心得：</td>
											<td>
												<input type="text" name="productCommentSet.experience" objName="productCommentSet[:name].experience" class="objName formText required" />
												<input type="hidden" name="productCommentSet.rank" objName="productCommentSet[:name].rank" class="objName rank_${list.productitem.product.id} formText" />
												<input type="hidden" name="productCommentSet.product.id" value="${list.productitem.product.id}" objName="productCommentSet[:name].product.id" class="objName formText" />
											</td>
										</tr>
										<tr>
											<td class="title">优点：</td>
											<td>
											<input type="text" name="productCommentSet.advantage" objName="productCommentSet[:name].advantage" class="objName formText required" />
											</td>
										</tr>
										<tr>
											<td class="title">缺点：</td>
											<td>
											<input type="text" name="productCommentSet.shortcoming" objName="productCommentSet[:name].shortcoming" class="objName formText required" />
											</td>
										</tr>
									</table>
									
								</td>
							</tr>
					</table> 
						</#list>
					</form>
				</#if>
			</#if>
					
				</div>
				<div class="bottom"></div>
			</div>
		</div>
		<div class="blank"></div>
		<#include "/WEB-INF/template/shop/friend_link.ftl">
	</div>
	<div class="blank"></div>
	<#include "/WEB-INF/template/shop/footer.ftl">
</body>
</html>